package demo.victoryCases;
class Info<T,V>{
    private T var;
    private V value;

    public Info(T var, V value) {
        this.var = var;
        this.value = value;
    }

    public T getVar() {
        return var;
    }

    public void setVar(T var) {
        this.var = var;
    }

    public V getValue() {
        return value;
    }

    public void setValue(V value) {
        this.value = value;
    }
}
class Demo1<S>{
    private S info;     //泛型的嵌套  把info作为Demo泛型的类型

    public Demo1(S info) {
        this.info = info;
    }

    public S getInfo() {
        return info;
    }

    public void setInfo(S info) {
        this.info = info;
    }
}
public class Demo {
    public static void main(String[] args) {
        Info<String,Integer> info = new Info<>("张三",88);
        Demo1<Info<String, Integer>> d = new Demo1<>(info);
        System.out.println(info.getVar());
        System.out.println(info.getValue());
    }
}
